package com.wframe.project.former.entity;

import org.apache.commons.lang.StringUtils;

import com.frame.database.TableBean;
import com.frame.database.TableKey;

public class ProductsAttrvalBean implements TableBean{

	private Integer attrid;
	private String attrcode;
	private String val;
	private String valtxt;
	
	public ProductsAttrvalBean(){
		
	}
	public ProductsAttrvalBean(Integer attrid,String val){
		this.attrid=attrid;
		this.val=val;
	}
	
	@Override
	public TableKey getTableKey() {
		// TODO Auto-generated method stub
		return new TableKey("wb_products_attrval");
	}

	public Integer getAttrid() {
		return attrid;
	}

	public void setAttrid(Integer attrid) {
		this.attrid = attrid;
	}

	public String getVal() {
		return val;
	}

	public void setVal(String val) {
		this.val = val;
	}
	public String getAttrcode() {
		return attrcode;
	}
	public void setAttrcode(String attrcode) {
		this.attrcode = attrcode;
	}
	public String getValtxt() {
		if(StringUtils.isBlank(valtxt))return val;
		return valtxt;
	}
	public void setValtxt(String valtxt) {
		this.valtxt = valtxt;
	}
	
}
